package com.peanut.persistence;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import com.peanut.model.User;

@Repository
public class UserDaoIbatis extends BaseDaoIbatis {

	public List<User> queryAllUser(Map param, int offset, int limit) {
		return (List<User>)this.getSqlSession().selectList("com.peanut.persistence.UserMapper.queryAllUser", 
				param, new RowBounds(offset, limit));
	}
	
	public long queryAllUserCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.UserMapper.queryAllUserCount", 
				param);
	}
}
